home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 8 / FM Towns Free Software Collection 8.iso / t_os / gpen32k / source / lib / osrc / omos.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-01  |  635 b   |  26 lines

  1. /************************************************************
  2. *   共通一般ライブラリー                OKOME System 2      *
  3. ************************************************************/
  4.  
  5. #include    <stdio.h>
  6. #include    <string.h>
  7. #include    <MOS.H>
  8. #include    <normlib.h>
  9.  
  10. void MOS_typeRom2( int num, int x, int y, char *adr )
  11. {
  12.     int i, j;
  13.     MOS_typeRom( num, x, y, adr );
  14.     memcpy(adr+514, adr+130, 128);
  15.     for ( i = 127; i>=0; i-- )
  16.     {
  17.         for ( j = 3; j>=0; j-- )
  18.         {
  19.             adr[i*4+j+2] = 0x88
  20.                          + (adr[i+2] / powi(2, 6-j*2) & 1)*0x70
  21.                          + (adr[i+2] / powi(2, 7-j*2) & 1)*0x07;
  22.         }
  23.     }
  24.     MOS_type( 2, x, y, adr );
  25. }
  26.